package cn.wolfcode.cms.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {
    //获取结束时间
    public static Date getEndDate(Date date){
        if(date == null){
            return null;
        }
        //获取日历类
        Calendar calendar = Calendar.getInstance();
        //设置日历当前时间
        calendar.setTime(date);
        //设置日历的时分秒
        calendar.set(Calendar.HOUR,23);
        calendar.set(Calendar.MINUTE,59);
        calendar.set(Calendar.SECOND,59);
        return calendar.getTime();
    }
}
